<?php
    /**
     * Created by PhpStorm.
     * User: walker
     * Date: 2019/1/14 0014
     * Time: 18:31
     */
    namespace App\Http\ViewComposers;
    use App\Libs\CommonUtils;
    use Illuminate\Http\Request;
    use Illuminate\View\View;
    class AdminComposer{
        private  $data=null;

        public function __construct(Request $request)
        {
            $this->data=new CommonUtils($request);
        }
        public function compose(View $view) {
            $view->with([
                            'admin' => $this->data->admin,
                        ]);//填充数据
        }

    }